/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86156
 * Date: 2023-04-07
 * Time: 14:37
 */
public class GameTest {
    public static void main(String[] args) {
        Role r1 = new Role("蔡徐坤",100,'男');
        Role r2 = new Role("小黑子",100,'女');

       /* r1.showRoleInfo();
        r2.showRoleInfo();*/

        while(true){
            r1.attack(r2);
            System.out.println();
            if(r2.getBlood() == 0){
                System.out.println(r1.getName()+"KO了"+r2.getName());
                break;
            }

            r2.attack(r1);
            System.out.println();
            if(r1.getBlood() == 0){
                System.out.println(r2.getName()+"KO了"+r1.getName());
                break;
            }
        }
    }
}
